﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CourseArraging.Common; 
using Microsoft.Reporting.WinForms;
using Stone.DataContracts;
using Stone.Library.Common;

namespace CourseArraging.Frm.bbxx
{
    public partial class FrmTecKb : Form
    {
        /// <summary>
        /// 版权所有
        /// 石世特@温州医学院 sst330381@gmail.com
        /// </summary> 
        public FrmTecKb()
        {
            InitializeComponent();
        }
        public FrmTecKb(TecArrangeEntity tecEntity)
            :this()
        {
            reportViewer1.LocalReport.ReportPath = GlobalVar.filePath + @"\bb\BbTecKb.rdlc";
            foreach (CourseEntity ce in tecEntity.course_info)
            {
                if (CommonHelper.course2simple(ce.course_time) == "11")
                { ReportParameter T11 = new ReportParameter("T11", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T11); }
                else if (CommonHelper.course2simple(ce.course_time) == "12")
                { ReportParameter T12 = new ReportParameter("T12", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T12); }
                else if (CommonHelper.course2simple(ce.course_time) == "13")
                { ReportParameter T13 = new ReportParameter("T13", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T13); }
                else if (CommonHelper.course2simple(ce.course_time) == "14")
                { ReportParameter T14 = new ReportParameter("T14", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T14); }
                else if (CommonHelper.course2simple(ce.course_time) == "15")
                { ReportParameter T15 = new ReportParameter("T15", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T15); }
                else if (CommonHelper.course2simple(ce.course_time) == "16")
                { ReportParameter T16 = new ReportParameter("T16", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T16); }
                else if (CommonHelper.course2simple(ce.course_time) == "21")
                { ReportParameter T21 = new ReportParameter("T21", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T21); }
                else if (CommonHelper.course2simple(ce.course_time) == "22")
                { ReportParameter T22 = new ReportParameter("T22", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T22); }
                else if (CommonHelper.course2simple(ce.course_time) == "23")
                { ReportParameter T23 = new ReportParameter("T23", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T23); }
                else if (CommonHelper.course2simple(ce.course_time) == "24")
                { ReportParameter T24 = new ReportParameter("T24", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T24); }
                else if (CommonHelper.course2simple(ce.course_time) == "25")
                { ReportParameter T25 = new ReportParameter("T25", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T25); }
                else if (CommonHelper.course2simple(ce.course_time) == "26")
                { ReportParameter T26 = new ReportParameter("T26", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T26); }
                else if (CommonHelper.course2simple(ce.course_time) == "31")
                { ReportParameter T31 = new ReportParameter("T31", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T31); }
                else if (CommonHelper.course2simple(ce.course_time) == "32")
                { ReportParameter T32 = new ReportParameter("T32", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T32); }
                else if (CommonHelper.course2simple(ce.course_time) == "33")
                { ReportParameter T33 = new ReportParameter("T33", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T33); }
                else if (CommonHelper.course2simple(ce.course_time) == "34")
                { ReportParameter T34 = new ReportParameter("T34", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T34); }
                else if (CommonHelper.course2simple(ce.course_time) == "35")
                { ReportParameter T35 = new ReportParameter("T35", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T35); }
                else if (CommonHelper.course2simple(ce.course_time) == "36")
                { ReportParameter T36 = new ReportParameter("T36", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T36); }
                else if (CommonHelper.course2simple(ce.course_time) == "41")
                { ReportParameter T41 = new ReportParameter("T41", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T41); }
                else if (CommonHelper.course2simple(ce.course_time) == "42")
                { ReportParameter T42 = new ReportParameter("T42", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T42); }
                else if (CommonHelper.course2simple(ce.course_time) == "43")
                { ReportParameter T43 = new ReportParameter("T43", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T43); }
                else if (CommonHelper.course2simple(ce.course_time) == "44")
                { ReportParameter T44 = new ReportParameter("T44", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T44); }
                else if (CommonHelper.course2simple(ce.course_time) == "45")
                { ReportParameter T45 = new ReportParameter("T45", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T45); }
                else if (CommonHelper.course2simple(ce.course_time) == "46")
                { ReportParameter T46 = new ReportParameter("T46", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T46); }
                else if (CommonHelper.course2simple(ce.course_time) == "51")
                { ReportParameter T51 = new ReportParameter("T51", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T51); }
                else if (CommonHelper.course2simple(ce.course_time) == "52")
                { ReportParameter T52 = new ReportParameter("T52", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T52); }
                else if (CommonHelper.course2simple(ce.course_time) == "53")
                { ReportParameter T53 = new ReportParameter("T53", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T53); }
                else if (CommonHelper.course2simple(ce.course_time) == "54")
                { ReportParameter T54 = new ReportParameter("T54", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T54); }
                else if (CommonHelper.course2simple(ce.course_time) == "55")
                { ReportParameter T55 = new ReportParameter("T55", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T55); }
                else if (CommonHelper.course2simple(ce.course_time) == "56")
                { ReportParameter T56 = new ReportParameter("T56", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T56); }
                else if (CommonHelper.course2simple(ce.course_time) == "61")
                { ReportParameter T61 = new ReportParameter("T61", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T61); }
                else if (CommonHelper.course2simple(ce.course_time) == "62")
                { ReportParameter T62 = new ReportParameter("T62", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T62); }
                else if (CommonHelper.course2simple(ce.course_time) == "63")
                { ReportParameter T63 = new ReportParameter("T63", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T63); }
                else if (CommonHelper.course2simple(ce.course_time) == "64")
                { ReportParameter T64 = new ReportParameter("T64", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T64); }
                else if (CommonHelper.course2simple(ce.course_time) == "65")
                { ReportParameter T65 = new ReportParameter("T65", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T65); }
                else if (CommonHelper.course2simple(ce.course_time) == "66")
                { ReportParameter T66 = new ReportParameter("T66", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T66); }
                else if (CommonHelper.course2simple(ce.course_time) == "71")
                { ReportParameter T71 = new ReportParameter("T71", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T71); }
                else if (CommonHelper.course2simple(ce.course_time) == "72")
                { ReportParameter T72 = new ReportParameter("T72", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T72); }
                else if (CommonHelper.course2simple(ce.course_time) == "73")
                { ReportParameter T73 = new ReportParameter("T73", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T73); }
                else if (CommonHelper.course2simple(ce.course_time) == "74")
                { ReportParameter T74 = new ReportParameter("T74", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T74); }
                else if (CommonHelper.course2simple(ce.course_time) == "75")
                { ReportParameter T75 = new ReportParameter("T75", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T75); }
                else if (CommonHelper.course2simple(ce.course_time) == "76")
                { ReportParameter T76 = new ReportParameter("T76", ce.course_name + " | " + ce.stu_name+" | "+ce.course_bz); this.reportViewer1.LocalReport.SetParameters(T76); }
            }


            ReportParameter name = new ReportParameter("name", tecEntity.user_name);
            ReportParameter jp = new ReportParameter("jp", tecEntity.user_spell);
            ReportParameter sex = new ReportParameter("sex", tecEntity.user_sex);
            ReportParameter nj = new ReportParameter("nj", tecEntity.user_grade);
            ReportParameter kc = new ReportParameter("kc", tecEntity.user_course);
            ReportParameter sj = new ReportParameter("sj", tecEntity.user_phone);
            ReportParameter gh = new ReportParameter("gh", tecEntity.user_gddh);
            ReportParameter dz = new ReportParameter("dz", tecEntity.user_address);
            ReportParameter fx = new ReportParameter("fx", tecEntity.user_depname);
            ReportParameter bz = new ReportParameter("bz", tecEntity.user_bz);
            ReportParameter djrq = new ReportParameter("djrq", tecEntity.user_regedit);



            this.reportViewer1.LocalReport.SetParameters(
            new ReportParameter[] { name, jp, sex, nj, kc, sj, gh, dz, fx, bz, djrq });
        }

        private void FrmTecKb_Load(object sender, EventArgs e)
        {
            this.reportViewer1.RefreshReport();
        }
    }
}
